Dijkstra Monads in Monadic Computation

نویسنده

  • Bart Jacobs
چکیده

The Dijkstra monad has been introduced recently for capturing weakest precondition computations within the context of program verification, supported by a theorem prover. Here we give a more general description of such Dijkstra monads in a categorical setting. We first elaborate the recently developed view on program semantics in terms of a triangle of computations, state transformers, and predicate transformers. Instantiations of this triangle for different monads T show how to define the Dijkstra monad associated with T , via the logic involved. Technically, we provide a morphism of monads from the state monad transformation applied to T , to the Dijkstra monad associated with T . This monad map is precisely the weakest precondition map in the triangle, given in categorical terms by substitution.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Dijkstra and Hoare monads in monadic computation

The Dijkstra and Hoare monads have been introduced recently for capturing weakest precondition computations and computations with preand post-conditions, within the context of program verification, supported by a theorem prover. Here we give a more general description of such monads in a categorical setting. We first elaborate the recently developed view on program semantics in terms of a trian...

متن کامل

From Monads to Effects and Back

The combination of monads and effects leads to a clean and easy to reason programming paradigm. Monadic programming is easy to reason, but can be cumbersome, as it requires explicit lifting and binding. In this paper, we combine monads and effects within a single programming paradigm: we use monads to define the semantics of effect types, and then, use the effects to program with those monads. ...

متن کامل

Skeletons and the Anatomy of Monads

Monads are used heavily in Haskell for supporting computational effects, and the language offers excellent support for defining monadic computations. Unfortunately, defining a monad remains a difficult challenge. There are no libraries that a programmer can use to define a monad that is not a composition of existing monad transformers; therefore every such effort must start from scratch despite...

متن کامل

CS 6110 Lecture 36 A Monadic Approach to

It is also possible to define monads in terms of two other operations, map : (D → E) → M(D) → M(E) and join : M(M(D))→M(D). This is often the approach taken in category theory, but the definitions are equivalent. We use the notation [σ] to denote unit(σ), and the notation f∗(m) to denote bind(f)(m). Monads figure heavily in the programming language Haskell, which uses monads as a way to introdu...

متن کامل

Monads for Incremental Computing Functional Pearl

This paper presents a monadic approach to incremental computation, suitable for purely functional languages such as Haskell. A program that uses incremental computation is able to perform an incremental amount of computation to accommodate for changes in input data. Recently, Acar, Blelloch and Harper presented a small Standard ML library that supports efficient, high-level incremental computat...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014